package com.yizhi.service.Impl;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.yizhi.domain.dto.WorksManageDTO;
import com.yizhi.domain.entityDO.WorksManageDO;
import com.yizhi.domain.vo.WorksManageVO;
import com.yizhi.mapper.WorksManageMapper;
import com.yizhi.service.IWorksManageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yizhi.util.PageResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 考试管理表 服务实现类
 * </p>
 *
 * @author zhouyihe
 * @since 2024-04-16
 */
@Service
public class WorksManageServiceImpl extends ServiceImpl<WorksManageMapper, WorksManageDO> implements IWorksManageService {
    @Autowired
    private WorksManageMapper worksManageMapper;
    
    @Override
    public PageResult pageQuery(WorksManageDTO worksManageDTO) {
        PageHelper.startPage(worksManageDTO.getPage(),worksManageDTO.getPageSize());
        Page<WorksManageVO> page = worksManageMapper.pageQuery(worksManageDTO);
        return new PageResult(page.getResult(),page.getTotal());
    }
}
